home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
asmsrc
/
phagexsources.lha
/
source
/
QuickDial.s
< prev
next >
Wrap
Text File
|
1993-08-20
|
2KB
|
81 lines
; DTFM Tone Dialler, just dials the phone number in the variable. Works
; on all BT digital exchanges
Opt c-
Section "ToneDialler",Code_c
Start Movem.l d0-d7/a0-a6,-(sp)
Move.l 4,a6 ; Disable Tasks and
Jsr -$78(a6) ; Interrupts
Lea SineToneData(pc),a0
Move.l a0,$Dff0b0 ; Set Sample pos to Sine
Move.w #8,$Dff0b4 ; Set DMA Length
Move.w #0,$Dff0b6 ; Set period...
Move.l a0,$Dff0c0 ; Same with other channel
Move.w #8,$Dff0c4 ;
Move.w #0,$Dff0c6 ;
Move.w #$0010,$Dff09e ; No Audio interrupt
Move.w #$8206,$Dff096 ; Just enable channels 1&2
Moveq #0,d0
Lea TeleNumber(pc),a5
GetNumber Move.b (a5)+,d0 ; Run digits thru ToneDial
Beq Quit
Bsr DoDialTone
Btst #6,$Bfe001
Beq Quit
Bra GetNumber
Quit Move.w #6,$Dff096
JustEnable Move.l 4,a6
Jsr -$7e(a6)
Movem.l (sp)+,d0-d7/a0-a6
Clr.l d0
Rts
DoDialTone Move.l d0,d7 ; Dual Tone Frequency Mod
Cmp.b #$30,d7 ; Dialler routine
Bne NotASCZero
Add.b #11,d7
NotASCZero Cmp.b #$30,d0
Blt DoPause
Cmp.b #$39,d0
Bgt DoPause
Sub.b #$31,d7
Move.w d7,d1
Divu #3,d1
Move.w d1,d2
Swap d1
Asl.w #1,d1
Asl.w #1,d2
And.l #$ff,d1
And.l #$ff,d2
Lea ToneBank1(pc),a0 ; Get Tone 1 Pitch
Lea ToneBank2(pc),a1 ; Get Tone 2 Pitch
Move.w 0(a0,d1.l),$Dff0b6
Move.w 0(a1,d2.l),$Dff0c6
Move.w #$40,$Dff0b8 ; Set Volumes to 40
Move.w #$40,$Dff0c8 ;
Move.l #$88b8,d0
TonePauseLoop Sub.l #1,d0
Bne TonePauseLoop
Move.w #0,$Dff0b8 ; Set Volumes to 0
Move.w #0,$Dff0c8 ;
DoPause Move.l #$2d92,d0 ; Quick Pause in between
PauseLoop Sub.l #1,d0 ; Tones
Bne PauseLoop
Rts
TeleNumber Dc.b "0803 294775",0
Even
SineToneData Dc.b $0,$26,$47,$5c,$64,$5c,$47,$26
Dc.b $0,$da,$b9,$a4,$9c,$a4,$b9,$da
ToneBank1 Dc.w $b9,$a7,$97,$89
ToneBank2 Dc.w $140,$122,$106,$ed,0,0,0,0